package cn.wolfcode.crm.service;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.domain.PageResult;
import cn.wolfcode.crm.qo.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.poi.ss.usermodel.Workbook;

import java.util.List;

public interface IEmployeeService {
    void delete(Long id);

    void save(Employee employee, Long[] ids);

    Employee get(Long id);

    List<Employee> listAll();

    void update(Employee employee, Long[] ids);

    /**
     * 分页
     *
     * @param qo
     * @return
     */
    PageInfo<Employee> query(QueryObject qo);

    Employee login(String username, String password);

    List<String> getPermissionByEmployeeId(Long id);

    /**
     * 批量删除员工
     * @param ids
     */
    void batchDelete(Long[] ids);

    /**
     * 验证用户名是否存在
     * @param name
     * @return
     */
    Employee checkName(String name);

    /**
     * 导出
     * @return
     */
    Workbook exportXls();

    /**
     * 导入
     * @param wb
     */
    void importXls(Workbook wb);

    /**
     * 根据角色编码 查询对应的员工
     * @param sns
     * @return
     */
    List<Employee> selectEmployeeByRoleSn(String...sns);
}
